export enum Tasks {
  ASSEMBLE_HAP = 'assembleHap',
  ASSEMBLE_APP = 'assembleApp',
}

export class Constants {
  static readonly RICH_DEVICES = [
    'car',
    'phone',
    'tablet',
    'tv',
    'wearable',
    'router',
    'default',
  ];
  static readonly ASSEMBLE_HAP = 'assembleHap';

  static readonly ASSEMBLE_APP = 'assembleApp';

  static readonly DEFAULT = 'default';

  static readonly APP_OUTPUT_FILE_LIST = [
    '{projectName}-{productName}-unsigned.app',
    'pack.info',
  ];

  static readonly SIGNED_APP = '{projectName}-{productName}-signed.app';

  static readonly HAP_OUTPUT_FILE_LIST = [
    '{moduleName}-{targetName}-unsigned.hap',
    'pack.info',
  ];

  static readonly MIXED_HAP_OUTPUT_FILE_LIST = [
    'bin',
    'entry-default-lite-signed.hap',
    'entry-default-lite-unsigned.hap',
    'entry-default-signed.hap',
    'entry-default-unsigned.hap',
    'pack.info',
  ];

  static readonly MIXED_UNSIGNED_HAP_OUTPUT_FILE_LIST = [
    'bin',
    'entry-default-lite-unsigned.hap',
    'entry-default-unsigned.hap',
    'pack.info',
  ];

  static readonly FEATURE_HAP_OUTPUT_FILE_LIST = [
    '{moduleName}-{entryModuleName}-{targetName}-signed.hap',
    '{moduleName}-{entryModuleName}-{targetName}-unsigned.hap',
    '{entryModuleName}',
  ];

  static readonly FEATURE_UNSIGNED_HAP_OUTPUT_FILE_LIST = [
    '{moduleName}-{entryModuleName}-{targetName}-unsigned.hap',
    '{moduleName}-{entryModuleName}-{targetName}-lite-unsigned.hap',
    '{entryModuleName}',
  ];

  static readonly MIXED_APP_OUTPUT_FILE_LIST = [
    'app',
    'entry-default-lite-unsigned.hap',
    'entry-default-unsigned.hap',
    'entry-default-lite-signed.hap',
    'entry-default-signed.hap',
    'pack.info',
  ];

  static readonly MIXED_UNSIGNED_APP_OUTPUT_FILE_LIST = [
    'app',
    'entry-default-lite-unsigned.hap',
    'entry-default-unsigned.hap',
    'pack.info',
  ];

  static readonly SIGNED_HAP = '{moduleName}-{targetName}-signed.hap';

  static readonly HAP_OUTPUT_BIN_FILE_LIST = [
    '{moduleName}-{targetName}.bin',
  ];

  static readonly HAP_OUTPUT_APP_FILE_LIST = [
    '{moduleName}-{targetName}.hap',
  ];

  static readonly SOURCE_FILE_LIST = [
    'assets',
    'config.json',
  ];

  static readonly FEATURE = 'feature';

  static readonly ENTRY = 'entry';
}

export const OHOS_SIGNATURE_TEMPLATE = {
  'name': 'default',
  'material': {
    storeFile: './sign/myapplication_debug.p12',
    storePassword: '0000001B734C857D79A0AFE684D4F7C9461064D24605328C9AC15302BCB7D9606F8B6D82949497240F684F',
    keyAlias: 'debugKey',
    keyPassword: '0000001B92B7D7143F022695515F8F862090F22016F59D86A642F36AA953ECD76A5DAE6941C04D8FFFF864',
    signAlg: 'SHA256withECDSA',
    profile: './sign/myapplication_debug.p7b',
    certpath: './sign/myapplication_debug.cer',
  },
};

export const HOS_SIGNATURE_TEMPLATE = {
  'name': 'default',
  'material': {
    'certpath': './sign-hos/myapplication_debug.cer',
    'storePassword': '0000001BA48C7DC07CD7CEEE7B5A0D12495440D235C72EA3D0C5A5F100FB2CAE2827B8A34D969D0ADA540C',
    'keyAlias': 'debugKey',
    'keyPassword': '0000001B7A26EB5AA5CE7AE63B9D1CA72E2F453586ED6F891393351368E01C89F0910FB6D567F1C2FC6E3F',
    'profile': './sign-hos/myapplication_debug.p7b',
    'signAlg': 'SHA256withECDSA',
    'storeFile': './sign-hos/myapplication_debug.p12'
  },
  'type': 'HarmonyOS',
};

export const PAGE_CSS_TEMPLATE = '.container {\n' +
  '    display: flex;\n' +
  '    flex-direction: column;\n' +
  '    justify-content: center;\n' +
  '    align-items: center;\n' +
  '    left: 0px;\n' +
  '    top: 0px;\n' +
  '    width: 100%;\n' +
  '    height: 100%;\n' +
  '}\n' +
  '\n' +
  '.title {\n' +
  '    font-size: 38px;\n' +
  '    text-align: center;\n' +
  '    width: 100%;\n' +
  '    height: 40%;\n' +
  '    margin: 10px;\n' +
  '}';

export const PAGE_HML_TEMPLATE = '<div class="container">\n' +
  '    <text class="title">\n' +
  '        {{ title }}\n' +
  '    </text>\n' +
  '</div>\n';

export const PAGE_JS_TEMPLATE = 'export default {\n' +
  '    data: {\n' +
  '        title: ""\n' +
  '    },\n' +
  '    onInit() {\n' +
  '        this.title = "Hello World";\n' +
  '    }\n' +
  '}\n';
